package 集合泛型;

import javax.sound.midi.SysexMessage;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;

public class 哈希 {
    public static void main(String[] args) {
        //Collection->List ArrayList
        List<Integer> list=new ArrayList<>(List.of(11,22,33,11,44,55,11,66));
        System.out.println(list);
        System.out.println(list.size());
        //Collection->Set HashSet
        //对象不能重复，重复只保留一个，元素没有顺序，不能随机访问
        HashSet<Integer> set =new HashSet<>(List.of(11,22,33,11,44,55,11,66));
        System.out.println(set.size());
        System.out.println(set);

    }
}
